Fix the SYNTAX_SUGGEST_DEBUG spec on Windows - #262
Merged
Merged
Conversation
cmd.exe does not understand the POSIX `VAR=value command` form and tried to run SYNTAX_SUGGEST_DEBUG as a command. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Collaborator
|
Thanks. We should probably add one smoke test for windows CI here. |
schneems
added a commit
that referenced
this pull request
Sep 11, 2026
Would have caught #262 before going into main.
Earlopain
pushed a commit
to Earlopain/syntax_suggest
that referenced
this pull request
Sep 15, 2026
The windows-latest leg added in ruby#263 reports success without running any tests. bin/rake is a bash script (it begins with a /usr/bin/env bash shebang), but the test step sets no shell:, and windows-latest defaults to PowerShell, which cannot execute the extensionless binstub. The step exits 0 with no output (about 1s, zero rspec examples) while the check shows green, a false green that guards nothing. Set a job-level defaults.run.shell: bash so bin/rake test runs under Git Bash (present on the Windows runner) on every OS. bash is already the default on Ubuntu, so the existing Linux matrix is unaffected. This makes the Windows job actually execute the suite, which is what ruby#263 intended: the SYNTAX_SUGGEST_DEBUG spec fixed in ruby#262 shells out via a Ruby backtick that runs through cmd.exe on Windows, so a regression in it now surfaces as a real failure instead of passing silently.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
SYNTAX_SUGGEST_DEBUGspec added in #261 fails on Windows. The backtick command runs through cmd.exe, which does not understand the POSIXVAR=value commandform and tries to runSYNTAX_SUGGEST_DEBUGas a command. The spec then gets'SYNTAX_SUGGEST_DEBUG' is not recognized as an internal or external commandinstead of the expected error.https://github.com/ruby/ruby/actions/runs/34515928495/job/103002536286
This passes the variable through the env hash of
IO.popeninstead. It is a forward-port of ruby/ruby#18757, so the spec now matches ruby/ruby byte for byte. The CI here runs on Ubuntu only and cannot catch this.Generated with Claude Code